﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (User.IsInRole("Administrator"))
        {
            UserLabel.Text = "Admin";
            Session["Username"] = User.Identity.Name;
            UserLabel2.Text = Session["Username"].ToString();
        }
        else if (User.IsInRole("Agent"))
        {
            UserLabel.Text = "Agent";
            Session["Username"] = User.Identity.Name;
            UserLabel2.Text = Session["Username"].ToString();
        }
        else { UserLabel.Text = "Not User"; }



    }
}
